import 'package:flutter_plugin_test/message.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'flutter_plugin_test_method_channel.dart';

///抽象类：颤振插件测试平台 继承于 平台接口
abstract class FlutterPluginTestPlatform extends PlatformInterface {
  /// 构造一个颤振插件测试平台
  FlutterPluginTestPlatform() : super(token: _token);

  ///实力化令牌对象
  static final Object _token = Object();

  ///颤振插件测试平台 _实例 = 方法通道Flutter插件测试();
  static FlutterPluginTestPlatform _instance = MethodChannelFlutterPluginTest();

  /// 获取 方法通道Flutter插件测试实例
  static FlutterPluginTestPlatform get instance => _instance;

  /// 设置 实例（方法通道Flutter插件测试实例 实例）
  static set instance(FlutterPluginTestPlatform instance) {
    ///平台接口.验证令牌(实例,令牌)
    PlatformInterface.verifyToken(instance, _token);
    ///赋值实例
    _instance = instance;
  }

  ///获取当前位置
  Future<PositionInfo> getCurrentPosition() async {
    //音乐的位置
    throw UnimplementedError('音乐的位置()还没有实现。');
  }

  ///得到平台的版本
  Future<String?> getPlatformVersion() {
    //未实现的错误
    throw UnimplementedError('平台版本()还没有实现。');
  }

  ///initMusics
  Future<List<Map<String, dynamic>>> initMusics() {
    throw UnimplementedError('initMusics()还没有实现。');
  }

  ///playMusic
  Future<String?> playMusic(int index) {
    throw UnimplementedError('playMusic()还没有实现。');
  }

  ///startMusic
  Future<String?> startMusic() {
    throw UnimplementedError('startMusic()还没有实现。');
  }

  ///stopMusic
  Future<String?> stopMusic() {
    throw UnimplementedError('stopMusic()还没有实现。');
  }

  ///lastClick
  Future<String?> lastClick() {
    throw UnimplementedError('lastClick()还没有实现。');
  }

  ///nextClick
  Future<String?> nextClick() {
    throw UnimplementedError('nextClick()还没有实现。');
  }


}
